package mn.more.wits.server.dao.temp;

import java.util.HashMap;
import mn.more.wits.client.dto.Handshake;
import mn.more.wits.server.dao.ServiceInitDAO;

/**
 * @author $Author: mikeliucc $
 * @version $Id: TestServiceInitDAO.java 5 2008-09-01 12:08:42Z mikeliucc $
 */
public final class TestServiceInitDAO implements ServiceInitDAO {

	private HashMap<String, String> keys;

	public void setKeys(HashMap<String, String> keys) {
		this.keys = keys;
	}

	public String getKey(String appName) { return keys.get(appName); }

	public Handshake getHandshake(String appName) {
		Handshake hs = new Handshake();
		hs.setAppName(appName);
		hs.setKey(keys.get(appName));
		// todo: do we need other stuff for handshake? need to double-check

		return hs;
	}
}
